package com.hwadee.backend.entity.log;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Getter;
import lombok.Setter;
import java.util.Date;

@Setter
@Getter
@TableName("log")
public class Loggy {
    @TableId(value = "logid" , type = IdType.AUTO)
    private int logId;
    private String id;
    private String role;
    private String username;
    @TableField(value = "logintime")
    private Date loginTime;
    private String ip;
    @TableField(value = "recordtype")
    private String recordType;
    private String action;
    @TableField(value = "logtime")
    private Date logTime;
    @TableField(value = "recordid")
    private int recordId;

    // 构造函数
    public Loggy(int logId, String id, String username, String role, Date loginTime,
                           String ip, String recordType, String action, Date logTime, int recordId) {
        this.logId = logId;
        this.id = id;
        this.username = username;
        this.role = role;
        this.loginTime = loginTime;
        this.ip = ip;
        this.recordType = recordType;
        this.action = action;
        this.logTime = logTime;
        this.recordId = recordId;
    }


}